<?php

// Include the paypal library
include_once ('Paypal.php');

// Create an instance of the paypal library
$myPaypal = new Paypal();

// Specify your paypal email
$myPaypal->addField('business', 'seller_1276523540_biz@gmail.com');

// Specify the currency
$myPaypal->addField('currency_code', 'HKD');

// Specify the url where paypal will send the user on success/failure
$myPaypal->addField('return', 'http://hktun.com/hktun/include/library/payment/paypal_success.php');
$myPaypal->addField('cancel_return', 'http://hktun.com/hktun/include/library/payment/paypal_failure.php');

// Specify the url where paypal will send the IPN
$myPaypal->addField('notify_url', 'http://hktun.com/hktun/include/library/payment/paypal_ipn.php');

//eric
//$myPaypal->addField('custom', 'out_trade_no parameter');
// Specify the product information
$myPaypal->addField('item_name', 'Pay_by_service_charge');
$myPaypal->addField('amount', '10');
$myPaypal->addField('item_number', '001');

// Specify any custom value, charge-1-1277726464-3863 means charge from userid 1 and date is 1277726464 and random number 3863
$myPaypal->addField('custom', 'charge-1-1277726464-3863');

// Enable test mode if needed
$myPaypal->enableTestMode();

// Let's start the train!
$myPaypal->submitPayment();